/* Copyright (c) 2011 Team A CS2340. All rights reserved.*/

package edu.gatech.teama.doctorsoffice.net;


import edu.gatech.teama.doctorsoffice.server.DataModel;

/**
 * Lookup an appointment by ID
 * @author Team A
 * @version $Revision: 1.0 $
 *
 */
public class LookupAppointmentMessage extends Message {

	/**
	 * Get appointment for specific ID
	 * @param id ID to lookup
	 */
	public LookupAppointmentMessage(String id) {
		super(id);
	}
	
	@Override // $codepro.audit.disable methodJavadoc
	public Message handle(DataModel model) {
		// TODO Auto-generated method stub
		return new AppointmentMessage(
				model.lookupAppointment((String) this.getPayload()));
	}

	@Override public String toString() { // $codepro.audit.disable methodJavadoc
		return this.getPayload().toString();
	}
	
}
